package com.liuli.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;



/**
 * 基本简历信息
 * @author liyunf
 *
 */
@Entity(name="Resume")
public class Resume {
	
	private Integer rid;  //简历 id
	private Integer uid;   //用户id
	private String ewstate;  //期望工作
	private String itstate;  //技能评价
	private String ostate;  //自定义模块
	private String prostate; //项目经验
	private String wsstate;  // 作品展示
	private String kind;  //
	private String city;  //期望工作地点
	private Short gender;  //用0和1表示的性别
	private Integer salary;  // 希望薪水
	private String profession;  //优先考虑到职位
	private String year;  //出生年份
	private String sex;  //性别
	private String degree;  //学历
	private String worktime;  //工作年限
	private String incity;  //所在城市
	private String tel;  //手机号码
	private String email;  // 联系邮箱
	private String rejectprofession;
	private String industry;
	private Boolean photoShow;
	private Boolean eduShow;
	private Boolean practiceShow;
	private Boolean langShow;
	private Boolean projectShow;
	private Boolean offerShow;
	private Boolean certShow;
	private Boolean trainingShow;
	private Boolean itskillShow;
	private Boolean positionShow;
	private Boolean scholarshipShow;
	private Boolean otherShow;
	private Boolean privacy;  //简历公开程度
	private String selfdc;  //自我介绍
	private Float percent;  //简历完整度
	private Integer addtime;  //简历的添加时间 
	private String updatetime;  //更新的时间
	private String attachment;  //附件地址
	private String nowstatu;  //工作状态
	private Integer useresume;
	
	private Set<ResumeEdu> resumeEdu=new HashSet<ResumeEdu>();
	private Set<ResumePractice> resumePractices = new HashSet<ResumePractice>();
	
	
	public Resume() {
		// TODO Auto-generated constructor stub
	}

	public Resume(Integer uid, String ewstate, String itstate, String ostate,
			String prostate, String wsstate, String kind, String city,
			Short gender, Integer salary, String profession, String year,
			String sex, String degree, String worktime, String incity,
			String tel, String email, String rejectprofession, String industry,
			Boolean photoShow, Boolean eduShow, Boolean practiceShow,
			Boolean langShow, Boolean projectShow, Boolean offerShow,
			Boolean certShow, Boolean trainingShow, Boolean itskillShow,
			Boolean positionShow, Boolean scholarshipShow, Boolean otherShow,
			Boolean privacy, String selfdc, Float percent, Integer addtime,
			String updatetime, String attachment, String nowstatu,
			Integer useresume) {
		super();
		this.uid = uid;
		this.ewstate = ewstate;
		this.itstate = itstate;
		this.ostate = ostate;
		this.prostate = prostate;
		this.wsstate = wsstate;
		this.kind = kind;
		this.city = city;
		this.gender = gender;
		this.salary = salary;
		this.profession = profession;
		this.year = year;
		this.sex = sex;
		this.degree = degree;
		this.worktime = worktime;
		this.incity = incity;
		this.tel = tel;
		this.email = email;
		this.rejectprofession = rejectprofession;
		this.industry = industry;
		this.photoShow = photoShow;
		this.eduShow = eduShow;
		this.practiceShow = practiceShow;
		this.langShow = langShow;
		this.projectShow = projectShow;
		this.offerShow = offerShow;
		this.certShow = certShow;
		this.trainingShow = trainingShow;
		this.itskillShow = itskillShow;
		this.positionShow = positionShow;
		this.scholarshipShow = scholarshipShow;
		this.otherShow = otherShow;
		this.privacy = privacy;
		this.selfdc = selfdc;
		this.percent = percent;
		this.addtime = addtime;
		this.updatetime = updatetime;
		this.attachment = attachment;
		this.nowstatu = nowstatu;
		this.useresume = useresume;
	}



    @Id
    @GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getRid() {
		return rid;
	}
	public void setRid(Integer rid) {
		this.rid = rid;
	}
	public Integer getUid() {
		return uid;
	}
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	public String getEwstate() {
		return ewstate;
	}
	public void setEwstate(String ewstate) {
		this.ewstate = ewstate;
	}
	public String getItstate() {
		return itstate;
	}
	public void setItstate(String itstate) {
		this.itstate = itstate;
	}
	public String getOstate() {
		return ostate;
	}
	public void setOstate(String ostate) {
		this.ostate = ostate;
	}
	public String getProstate() {
		return prostate;
	}
	public void setProstate(String prostate) {
		this.prostate = prostate;
	}
	public String getWsstate() {
		return wsstate;
	}
	public void setWsstate(String wsstate) {
		this.wsstate = wsstate;
	}
	public String getKind() {
		return kind;
	}
	public void setKind(String kind) {
		this.kind = kind;
	}
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	public Short getGender() {
		return gender;
	}
	public void setGender(Short gender) {
		this.gender = gender;
	}
	public Integer getSalary() {
		return salary;
	}
	public void setSalary(Integer salary) {
		this.salary = salary;
	}
	public String getProfession() {
		return profession;
	}
	public void setProfession(String profession) {
		this.profession = profession;
	}
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getDegree() {
		return degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	public String getWorktime() {
		return worktime;
	}
	public void setWorktime(String worktime) {
		this.worktime = worktime;
	}
	public String getIncity() {
		return incity;
	}
	public void setIncity(String incity) {
		this.incity = incity;
	}
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getRejectprofession() {
		return rejectprofession;
	}
	public void setRejectprofession(String rejectprofession) {
		this.rejectprofession = rejectprofession;
	}
	public String getIndustry() {
		return industry;
	}
	public void setIndustry(String industry) {
		this.industry = industry;
	}
	public Boolean getPhotoShow() {
		return photoShow;
	}
	public void setPhotoShow(Boolean photoShow) {
		this.photoShow = photoShow;
	}
	public Boolean getEduShow() {
		return eduShow;
	}
	public void setEduShow(Boolean eduShow) {
		this.eduShow = eduShow;
	}
	public Boolean getPracticeShow() {
		return practiceShow;
	}
	public void setPracticeShow(Boolean practiceShow) {
		this.practiceShow = practiceShow;
	}
	public Boolean getLangShow() {
		return langShow;
	}
	public void setLangShow(Boolean langShow) {
		this.langShow = langShow;
	}
	public Boolean getProjectShow() {
		return projectShow;
	}
	public void setProjectShow(Boolean projectShow) {
		this.projectShow = projectShow;
	}
	public Boolean getOfferShow() {
		return offerShow;
	}
	public void setOfferShow(Boolean offerShow) {
		this.offerShow = offerShow;
	}
	public Boolean getCertShow() {
		return certShow;
	}
	public void setCertShow(Boolean certShow) {
		this.certShow = certShow;
	}
	public Boolean getTrainingShow() {
		return trainingShow;
	}
	public void setTrainingShow(Boolean trainingShow) {
		this.trainingShow = trainingShow;
	}
	public Boolean getItskillShow() {
		return itskillShow;
	}
	public void setItskillShow(Boolean itskillShow) {
		this.itskillShow = itskillShow;
	}
	public Boolean getPositionShow() {
		return positionShow;
	}
	public void setPositionShow(Boolean positionShow) {
		this.positionShow = positionShow;
	}
	public Boolean getScholarshipShow() {
		return scholarshipShow;
	}
	public void setScholarshipShow(Boolean scholarshipShow) {
		this.scholarshipShow = scholarshipShow;
	}
	public Boolean getOtherShow() {
		return otherShow;
	}
	public void setOtherShow(Boolean otherShow) {
		this.otherShow = otherShow;
	}
	public Boolean getPrivacy() {
		return privacy;
	}
	public void setPrivacy(Boolean privacy) {
		this.privacy = privacy;
	}
	public String getSelfdc() {
		return selfdc;
	}
	public void setSelfdc(String selfdc) {
		this.selfdc = selfdc;
	}
	public Float getPercent() {
		return percent;
	}
	public void setPercent(Float percent) {
		this.percent = percent;
	}
	public Integer getAddtime() {
		return addtime;
	}
	public void setAddtime(Integer addtime) {
		this.addtime = addtime;
	}
	public String getUpdatetime() {
		return updatetime;
	}
	public void setUpdatetime(String updatetime) {
		this.updatetime = updatetime;
	}
	public String getAttachment() {
		return attachment;
	}
	public void setAttachment(String attachment) {
		this.attachment = attachment;
	}
	public String getNowstatu() {
		return nowstatu;
	}
	public void setNowstatu(String nowstatu) {
		this.nowstatu = nowstatu;
	}
	public Integer getUseresume() {
		return useresume;
	}
	public void setUseresume(Integer useresume) {
		this.useresume = useresume;
	}
	
    //FetchType.EAGER 立即加载  FetchType.lazy 懒加载  在页面访时不能够用懒加载
    @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="rid")
	public Set<ResumeEdu> getResumeEdu() {
		return resumeEdu;
	}

	public void setResumeEdu(Set<ResumeEdu> resumeEdu) {
		this.resumeEdu = resumeEdu;
	}
	
	
	//FetchType.EAGER 立即加载  FetchType.lazy 懒加载  在页面访时不能够用懒加载
    @OneToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
    @JoinColumn(name="rid")
	public Set<ResumePractice> getResumePractices() {
		return resumePractices;
	}

	public void setResumePractices(Set<ResumePractice> resumePractices) {
		this.resumePractices = resumePractices;
	}

	@Override
	public String toString() {
		return "Resume [rid=" + rid + ", uid=" + uid + ", ewstate=" + ewstate
				+ ", itstate=" + itstate + ", ostate=" + ostate + ", prostate="
				+ prostate + ", wsstate=" + wsstate + ", kind=" + kind
				+ ", city=" + city + ", gender=" + gender + ", salary="
				+ salary + ", profession=" + profession + ", year=" + year
				+ ", sex=" + sex + ", degree=" + degree + ", worktime="
				+ worktime + ", incity=" + incity + ", tel=" + tel + ", email="
				+ email + ", rejectprofession=" + rejectprofession
				+ ", industry=" + industry + ", photoShow=" + photoShow
				+ ", eduShow=" + eduShow + ", practiceShow=" + practiceShow
				+ ", langShow=" + langShow + ", projectShow=" + projectShow
				+ ", offerShow=" + offerShow + ", certShow=" + certShow
				+ ", trainingShow=" + trainingShow + ", itskillShow="
				+ itskillShow + ", positionShow=" + positionShow
				+ ", scholarshipShow=" + scholarshipShow + ", otherShow="
				+ otherShow + ", privacy=" + privacy + ", selfdc=" + selfdc
				+ ", percent=" + percent + ", addtime=" + addtime
				+ ", updatetime=" + updatetime + ", attachment=" + attachment
				+ ", nowstatu=" + nowstatu + ", useresume=" + useresume + "]";
	}
	
	
	
	
	
	
	
	

}
